package com.example.springiocdemo2.component;

import com.example.springiocdemo2.model.UserInfo;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

/**
 * @author Q
 * @create 2025-05-29-12:19
 */
@Component
public class UserComponent {
    public void sayHai() {
       System.out.println("hi,userComponent!");
    }
   @Bean
    public UserInfo userInfo() {
        return new UserInfo("张三",4654646);
    }
    @Bean
    public UserInfo userInfo2() {
        return new UserInfo("李四",4654646);
    }
}
